﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using Newtonsoft.Json;
using FreeSql.DataAnnotations;

namespace VueShopApi.Entities 
{
	/// <summary>
	/// 商品订单关联表
	/// </summary>
	[JsonObject(MemberSerialization.OptIn), Table(Name = "sp_order_goods", DisableSyncStructure = true)]
	public partial class SpOrderGoods 
	{
		/// <summary>
		/// 主键id
		/// </summary>
		[JsonProperty("id"), Column(Name = "id", IsPrimary = true, IsIdentity = true)]
		public int Id { get; set; }

		/// <summary>
		/// 商品id
		/// </summary>
		[JsonProperty("goods_id"), Column(Name = "goods_id", DbType = "mediumint(8) unsigned")]
		public int GoodsId { get; set; }

		/// <summary>
		/// 购买单个商品数量
		/// </summary>
		[JsonProperty("goods_number"), Column(Name = "goods_number", DbType = "tinyint(4)")]
		public sbyte GoodsNumber { get; set; } = 1;

		/// <summary>
		/// 商品单价
		/// </summary>
		[JsonProperty("goods_price"), Column(Name = "goods_price")]
		public decimal GoodsPrice { get; set; } = 0.00M;

		/// <summary>
		/// 商品小计价格
		/// </summary>
		[JsonProperty("goods_total_price"), Column(Name = "goods_total_price")]
		public decimal GoodsTotalPrice { get; set; } = 0.00M;

		/// <summary>
		/// 订单id
		/// </summary>
		[JsonProperty("order_id"), Column(Name = "order_id")]
		public int OrderId { get; set; }

	}

}
